`timescale 1ns/1ps
module ProgramModeFlipFlop_tb();
  reg PMI;
  reg PME;
  reg rst;
  reg clk;
  wire PMO;

  //DUT
  ProgramModeFlipFlop mode(.PMI(PMI), .PME(PME), .rst(rst), .clk(clk), .PMO(PMO));

  initial
  begin
    clk = 1'b0;
    PMI = 2'b00;
    PME = 1'b0;
    rst = 1'b0;
  end
  
  always
  begin
    #1000 clk = ~clk;
  end
  
  always
  begin
    #0 rst = ~rst;
    #5 PMI = 2'b01;
    #5 PME = ~PME;
    #5 PME = ~PME;
    #0 PMI = 2'b10;
    #5 PME = ~PME;
    #5 PME = ~PME;
    #0 PMI = 2'b11;
    #5 PMI = ~PMI;
    #5 PMI = ~PMI;
  end
endmodule
